package com.qyhl.school.school.vlog.comment;

import com.qyhl.webtv.commonlib.entity.school.SchoolVlogCommentBean;

import java.util.List;

public class SchoolVlogCommentPresenter implements SchoolVlogCommentContract.SchoolVlogCommentPresenter {
    private SchoolVlogCommentContract.SchoolVlogCommentView mView;
    private SchoolVlogCommentModel mModel;

    public SchoolVlogCommentPresenter(SchoolVlogCommentContract.SchoolVlogCommentView mView) {
        this.mView = mView;
        this.mModel = new SchoolVlogCommentModel(this);
    }

    @Override
    public void getCommentList(int vlogId, int lastId) {
        mModel.getCommentList(vlogId, lastId);
    }

    @Override
    public void sendComment(String username, String content, int vlogId) {
        mModel.sendComment(username, content, vlogId);
    }

    @Override
    public void setCommentList(List<SchoolVlogCommentBean> beanList, boolean isMore) {
        mView.setCommentList(beanList, isMore);
    }

    @Override
    public void setError(String msg, boolean isMore) {
        mView.setError(msg, isMore);
    }

    @Override
    public void sendSuccess(boolean needVerify) {
        mView.sendSuccess(needVerify);
    }

    @Override
    public void sendError(String msg) {
        mView.sendError(msg);
    }
}
